Additional cleanup for the register_token functionality#1728
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1728 +/- ##
==========================================
+ Coverage 75.20% 76.40% +1.20%
==========================================
Files 24 24
Lines 996 979 -17
Branches 186 186
==========================================
- Hits 749 748 -1
+ Misses 223 207 -16
Partials 24 24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request completes the cleanup of deprecated v1 token registration functionality from the Snowbridge codebase. The v1 registerToken functionality has been replaced with a v2 implementation, and this PR removes the remaining v1 code, tests, and documentation.
Changes:
- Replaced TypeScript v1 registration script with a deprecation notice directing users to v2
- Removed v1 token registration test file and references from Rust smoketest suite
- Removed v1
registerTokenandquoteRegisterTokenFeefunctions from Solidity contracts and Go bindings - Updated documentation to remove v1 token registration instructions
- Cleaned up debug print statements in related tests
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/packages/operations/src/register_erc20.ts | Replaced entire v1 registration implementation with deprecation notice |
| smoketest/tests/v1/set_token_transfer_fees.rs | Removed debug print statements for register token fees |
| smoketest/tests/v1/register_token.rs | Deleted entire v1 token registration test file |
| smoketest/tests/v1.rs | Removed module import for deleted register_token test |
| smoketest/run-v1-tests.sh | Removed register_token from test list |
| smoketest/run-legacy-v1-tests.sh | Removed register_token from legacy test list |
| smoketest/README.md | Removed token registration documentation section |
| relayer/contracts/v1/gateway.go | Removed auto-generated Go bindings for registerToken and quoteRegisterTokenFee, updated ABI |
| relayer/contracts/gateway.go | Updated ABI to add InvalidCommand error (unrelated contract change) |
| relayer/contracts/beefy_client.go | Updated ABI to add computeCommitmentHash function (unrelated contract change) |
| docs/developers/snowbridge-v1/token-transfers.md | Removed token registration section from documentation |
| contracts/test/SubstrateTypes.t.sol | Removed RegisterToken test and wrapper function |
| contracts/src/v1/Calls.sol | Removed registerToken, quoteRegisterTokenFee, and helper functions; reformatted quoteSendTokenFee signature |
| contracts/src/SubstrateTypes.sol | Removed RegisterToken encoding function |
| contracts/.gas-snapshot | Removed gas measurements for deleted registerToken tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
This file still has the implementation for isTokenRegistered. Since token registration functionality has been moved to V2, we should move it there surely?
|
There's also the I'd recommend renaming it to something like |
|
Still some more things... vincent@carryx:snowbridge$ rg REGISTER_TOKEN
smoketest/src/constants.rs
76: pub static ref REGISTER_TOKEN_FEE: u64 = env::var("REGISTER_TOKEN_FEE")
smoketest/tests/v1/set_token_transfer_fees.rs
34: U256([*REGISTER_TOKEN_FEE, 0, 0, 0]),
web/packages/test/scripts/set-env.sh
97:export REGISTER_TOKEN_FEE="${REGISTER_TOKEN_FEE:-200000000000000000}" |
You should also update the comment for snowbridge/contracts/src/v1/Types.sol Line 137 in c1f4eac |
|
Looks good now! Please deploy to Westend as a final sanity test. |
No description provided.